package game.scene.map;
import game.GlobalModel;
import game.scene.SceneStack;
import starruby.Texture;
import java.util.Hashtable;

public class Scene extends game.scene.BaseScene{
  private Model _model;
  private Controller _controller;
  private View _view;
  
  private GlobalModel globalModel;
  private Hashtable options;
  private boolean initialized = false;
  public Scene(GlobalModel globalModel, Hashtable options){
    this.globalModel = globalModel;
    this.options = options;
  }
  
  private void initialize(){
    _model = new Model(globalModel, options);
    _controller = new Controller();
    _view = new View();
    initialized = true;
  }
  
  public void update(SceneStack stack){
    if(!initialized){initialize();}
    _controller.update(_model, stack, this);
  }
  
  public void render(Texture s){
    _view.update(_model, s);
  }
}